Add gemma4-26b E2E test scripts for pre-training#4278
Draft
chiajunglien wants to merge 3 commits into
Draft
Conversation
…-26b Introduces E2E test configurations and scripts for gemma4-26b model, covering both inference decoding and pre-training validation pipelines.
This was referenced Jun 26, 2026
RexBearIU
reviewed
Jun 26, 2026
| # Non-Googlers please remember to point `BASE_OUTPUT_DIRECTORY` to the GCS paths where you want to store scanned and unscanned checkpoints | ||
| BASE_OUTPUT_DIRECTORY=gs://runner-maxtext-logs/${MODEL_NAME}/to_maxtext | ||
|
|
||
| # Step 1: Install torch |
Collaborator
There was a problem hiding this comment.
Please test whether we still need it.
Author
There was a problem hiding this comment.
Using the command below to test:
xpk workload create \
--cluster=mesa-v6e32-eu \
--workload=gemma4-logit-check-$(date +%m%d%H%M) \
--device-type=v6e-32 \
--num-slices=1 \
--priority=high \
--project=cienet-cmcs \
--zone=europe-west4-a \
--skip-validation \
--docker-image=gcr.io/tpu-prod-env-multipod/maxtext_jax_nightly:28210168847 \
--command="set -xue; \
python3 -m tests.utils.forward_pass_logit_checker \
load_parameters_path='gs://us-central1-emmalien-test-83df3ecd-bucket/gemma4-26b-0625/unscanned/2026-06-25-06-21-12/0/items' \
model_name=gemma4-26b \
use_multimodal=false \
scan_layers=false \
--hf_model_path=google/gemma-4-26b-a4b-it \
--max_kl_div=0.03 \
--run_hf_model=true \
hardware=cpu \
skip_jax_distributed_system=True"and got the error:
[transformers] PyTorch was not found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
[transformers] DeepseekV32Config got `key=rope_scaling` in kwargs but hasn't set it as attribute. For RoPE standardization you need to set `self.rope_parameters` in model's config.
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/deps/tests/utils/forward_pass_logit_checker.py", line 50, in <module>
from maxtext.checkpoint_conversion.utils.hf_utils import convert_jax_weight_to_torch
File "/deps/src/maxtext/checkpoint_conversion/utils/hf_utils.py", line 25, in <module>
import torch.nn.functional as F
ModuleNotFoundError: No module named 'torch'
XPK End: Fri Jun 26 09:08:08 UTC 2026
EXIT_CODE=1Seems it still need torch to be installed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces end-to-end (E2E) testing and validation pipelines for the Gemma 4 26B model in MaxText.
Blocked by: https://buganizer.corp.google.com/issues/527749229
Tests
Pre-Training:
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.